// filename: packages/index.ts
import Button from './components/Button/index.vue'
import Grid from "./Layouts/GridLayout/Grid/index.vue";
import GridItem from "./Layouts/GridLayout/GridItem/index.vue";
import Upload from "./components/Upload/Upload.vue";
import Flex from "./Layouts/FlexLayout/Flex.vue";

const components = [Button, Grid, GridItem,Upload,Flex]
import './style.css'

// 定义 install 方法，接收 Vue 作为参数。如果使用 use 注册插件，则所有的组件都将被注册
const install = function (Vue) {
    // 遍历注册全局组件
    components.forEach(component => {
        Vue.component(component.name, component)
    })
}

export default {
    // 导出的对象必须具有 install，才能被 Vue.use() 方法安装
    install,
}

export {
    Button as MalButton,
    Grid as MalGrid,
    GridItem as MalGridItem,
    Upload as MalUpload,
    Flex as MalFlex
}
